﻿@model Licitar.Models.Licitacion


@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Crear Licitacion</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{    
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Licitacion</legend>

        <div class="editor-label">
        Descripcion
            @Html.TextArea("textArea")
        </div>

         <div class="editor-label" id ="tipolabel">
            @Html.LabelFor(model => model.Tipo)
        </div>
        <div class="editor-field" id= "tiposelect">
            @Html.DropDownListFor(model => model.Tipo, new SelectList(ViewBag.tiposlicitacion, "TipoLicitacionID", "NombreTipoLicitacion"), "Select") 
            @Html.ValidationMessageFor(model => model.Tipo)
        </div>
        <div class="editor-label" id ="fchInlabel">
            @Html.LabelFor(model => model.FechaInicio)
       
        <div class="editor-field" id="fchInfield">
            @Html.EditorFor(model => model.FechaInicio)
            @Html.ValidationMessageFor(model => model.FechaInicio)
        </div>

        <div class="editor-label" id="fchFinlabel" >
            @Html.LabelFor(model => model.FechaFin)
        </div>
        <div class="editor-field" id="fchFinfield">
            @Html.EditorFor(model => model.FechaFin)
            @Html.ValidationMessageFor(model => model.FechaFin)
        </div>

        <div class="editor-label" id="pliegolabel">
            @Html.LabelFor(model => model.Pliego)
        </div>
        <div class="editor-field" id="pliegofield">
            @Html.EditorFor(model => model.Pliego)
            @Html.ValidationMessageFor(model => model.Pliego)
        </div>    

       

        <p>
            @Html.JQueryUI().Button("Create")
        </p>
    </fieldset>
<fieldset id="req">
        <legend>Requerimientos</legend>
        @*<script type="text/javascript">
   var Numerorequerimientos= 0
</script> *@
<div id = "requerimientos">
</div>
            
    </fieldset>
    <fieldset>
        <legend>Herramientas</legend>
         @Ajax.ActionLink("Agregar",
                         "Binario",
                         new AjaxOptions
                         {
                             UpdateTargetId = "req",
                             InsertionMode = InsertionMode.InsertAfter,
                             HttpMethod = "GET",
                             LoadingElementId = "loading",
                             LoadingElementDuration = 15000,
                         })

         <div id="loading" style="display:none; color:Red; font-weight: bold">
        <p>Loading Data...</p>
        </div>

         <div class="editor-label">
            @Html.LabelFor(model => model.Tipo)
        </div>
        <div class="editor-field" >
       
        </div>

    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<div>
    @Html.ActionLink("Tipos", "TipoLicitacion")
</div>

